/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.component.open.api.core.config;

import cn.hutool.core.util.ArrayUtil;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Import;
import org.noear.solon.annotation.Inject;

/**
 * <b>(OpenApiAutoConfiguration)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2022/7/28
 */
@Configuration
@Import(scanPackages = {"info.peigen.hotpot.component.open.api.core", "info.peigen.hotpot.common"})
public class OpenApiAuthVerifyIgnoreConfiguration {
    @Inject("${hotpot.openapi}")
    private OpenApiAuthVerifyIgnoreProperties openApiAuthVerifyIgnoreProperties;

    public Boolean isIgnoreApiCodes(String apiCode) {
        return ArrayUtil.contains(openApiAuthVerifyIgnoreProperties.getIgnoreApiCodes(), apiCode);
    }
}